< Prev(J) / Next(K) > / View :

Filename: /text/shared/guide/xsltfilter_create.xhp

(bookmark: bm_id7007583)
testing XML filters
XML filters;creating/testing

XML フィルタのテスト
XML フィルタ;作成/テスト

(variable: xsltfilter)Creating XML Filters
(variable: xsltfilter)XML フィルタの作成 (hd_id1413922.)

Creating an XML Filter for Office
Office 用 XML フィルタを作成(par_idN1053D.)

When you create an XML filter for Office, you need to design an XSLT stylesheet that can convert to and from the OpenDocument XML file format.
Office 用の XML フィルタを作成する場合は、OpenDocument XML ファイル形式との間で相互に変換可能なように XSLT スタイルシートをデザインする必要があります。(par_idN109A9.)

Tip Icon ヒント For more information about the OpenDocument XML format, go to http://xml.openoffice.org/.
OpenDocument XML 形式の詳細情報は、http://xml.openoffice.org/ を参照してください。(par_idN109B0.)

If you want, you can include a template with your filter to apply Office styles to an XML document that you import.
必要な場合、インポートする XML ドキュメントに Office スタイルを適用するために、フィルタに テンプレート を含めることができます。(par_idN109C5.)

You can also include the Document Type Definition (DTD) for the external XML format so you can validate the XML format, for example, when you test the filter.
たとえばフィルタをテストする場合などに XML の書式を検査できるように、外部 XML 形式用の 文書型定義 (Document Type Definition, DTD) を含めることもできます。(par_idN109CC.)

To Create an XML Filter
XML フィルタを作成するには(par_idN10531.)

  1. Create an XSLT transformation stylesheet that maps the elements of the external XML format to the elements of the OpenDocument XML file format and back again.
    外部 XML 形式の要素と OpenDocument XML ファイル形式の要素とを相互にマップする、XSLT 変換 スタイルシート を作成します。(par_idN109E0.)

  2. Create a template that assigns Office styles to elements in the external XML format when you import a file in this format into Office.
    この形式から Office にファイルをインストールする場合、外部 XML 形式内の要素に Office スタイルを割り当てるためのテンプレートを作成します。(par_idN109E8.)

  3. In Office Writer, create a text document, and choose Tools - XML Filter Settings.
    Office Writer でテキストドキュメントを作成して、ツール → XML フィルタ設定 を選択します。(par_idN109EC.)

  4. Click New.
    新規作成 をクリックします。(par_idN109F4.)

  5. In the XML Filter dialog, click the General tab, and define the properties of the filter.
    XML フィルタ ダイアログで、全般 タブをクリックしてから、フィルタのプロパティーを指定します。(par_idN109FC.)

  1. On the Transformation tab page, define the transformation properties for the filter.
    変換 プロパティーページで、フィルタの変換プロパティーを指定します。(par_idN10A1F.)

  1. Click OK.
    OK をクリックします。(par_idN10A4C.)

To Test an XML Filter
XML フィルタをテストするには(par_idN10A56.)

You can perform basic tests on a custom XML filter in Office.
Office 内で、カスタム XML フィルタの基本的なテストを行うことができます。(par_idN10A5A.)

Note Icon 注マーク The document is not altered by these tests.
テストによってドキュメントが変更されることはありません。 (par_idN10A91.)

  1. Create or open a text document.
    テキストドキュメントを作成するか、開くかします。(par_idN10A60.)

  2. Choose Tools - XML Filter Settings.
    ツール → XML フィルタの設定 を選択します。(par_idN10A67.)

  3. In the list of filters, select the filter that you want to test, and click Test XSLTs.
    このフィルタリストで、テスト対象のフィルタを選択してから、テキスト XSLT をクリックします。(par_idN10A6F.)

  4. To test an Export Filter, do one of the following in the Export area of the dialog:
    エクスポート フィルタをテストする場合、ダイアログの エクスポート 領域に対して以下のいずれかを行います。(par_idN10A82.)

  1. To test an Import Filter, click Browse in the Import area of the dialog, select a document, and click Open.
    インポート フィルタをテストする場合は、ダイアログの インポート 領域にある 検索 をクリックし、ドキュメントを選択してから、開く をクリックします。(par_idN10A99.)

  2. To validate the transformed file against the specified DTD, click Validate.
    変換されたファイルを、指定した DTD に対して検査するには、検査 をクリックします。(par_idN10E32.)

About XML Filters
XML フィルタについて(par_id8579668.)

Distributing XML filters
XML フィルタの配布(par_id5569017.)


< Prev / Next >